<template>
  <view class="user-trade-item bcl-white radius shadow" v-if="item">
    <view
      class="box box-between box-column-center fz-15 border border-bottom container"
    >
      <view class="bold">{{ item.action }}</view>
      <view class="cl-main fz-22">{{ item.cash }}</view>
    </view>

    <view class="box box-between p-10 cl-second">
      <view>{{ item.created_at }}</view>
      <view v-if="type == 1">{{ item.task_sn || "" }}</view>
      <view v-else>编号: {{ item.id }}</view>
    </view>
  </view>
</template>

<script>
export default {
  name: "userTradeItem",

  props: {
    item: {
      type: Object,
      default: () => {},
    },

    type: {
      type: Number,
      default: 1,
    },
  },
};
</script>
